#ifndef __ROSE_SUBPROCESS_H
#define __ROSE_SUBPROCESS_H

// First resource used to research pipes and subprocesses:
// http://www.cs.loyola.edu/~jglenn/702/S2005/Examples/dup2.html
//
// Second:
// http://stackoverflow.com/questions/948221/does-this-multiple-pipes-code-in-c-makes-sense
//
// Many, many thanks to juliano (juliano.info) for the sample code that rose_spawn_pipe_chain is based off of! :D

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
#include <malloc.h>
#include <string.h>

int rose_spawn_pipe(char **argv, int pin, int pout);
int rose_spawn_pipe_chain(char ***argv, int n);
int rose_wait(int pid);
int rose_wait_chain(int n, int pid);

#endif
